js replace space

114

javascript replace spaces with one space -

string = string.replace(/\s\s+/g, ' ');

Comments

Submit
0 Comments